Page({
  data: {
    currentCity: '成都',
    selectType: '0',
    doubleSelectAll: false,
    doubleSelectPrice: false,
    doubleSelectLocation: false,
    banner: [
      {
        imageUrl: '../../static/images/swipper/tooopen_1.jpg',
        directUrl: ''
      },
      {
        imageUrl: '../../static/images/swipper/tooopen_2.jpg',
        directUrl: ''
      },
      {
        imageUrl: '../../static/images/swipper/tooopen_3.jpg',
        directUrl: ''
      }
    ],
    prefer: [
      {
        title: '腾格里沙漠通湖草原旅游区',
        price: '39',
        decimal: '00',
        imageUrl: '../../static/images/swipper/tooopen_1.jpg',
        directUrl: ''
      },
      {
        title: '腾格里沙漠通湖草原旅游区',
        price: '39',
        decimal: '00',
        imageUrl: '../../static/images/swipper/tooopen_1.jpg',
        directUrl: ''
      }
    ],
    hot: [
      {
        title: '腾格里沙漠通湖草原旅游区',
        price: '39',
        decimal: '00',
        imageUrl: '../../static/images/swipper/tooopen_1.jpg',
        directUrl: ''
      },
      {
        title: '腾格里沙漠通湖草原旅游区',
        price: '39',
        decimal: '00',
        imageUrl: '../../static/images/swipper/tooopen_1.jpg',
        directUrl: ''
      }
    ]
  },
  filter: function (e) {
    if (e.currentTarget.dataset.type === this.data.selectType && e.currentTarget.dataset.type === '0') {
      this.setData({
        doubleSelectAll: !this.data.doubleSelectAll
      })
    } else if (e.currentTarget.dataset.type === this.data.selectType && e.currentTarget.dataset.type === '1') {
      this.setData({
        doubleSelectPrice: !this.data.doubleSelectPrice
      })
    } else if (e.currentTarget.dataset.type === this.data.selectType && e.currentTarget.dataset.type === '2') {
      this.setData({
        doubleSelectLocation: !this.data.doubleSelectLocation
      })
    }
    this.setData({
      selectType: e.currentTarget.dataset.type
    })
  }
})